//
//  dataHelper.h
//  AngelaBaby
//
//  Created by lanou3g on 15/10/13.
//  Copyright © 2015年 lanou3g. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"
#import "CategoryModel.h"
#import "ListModel.h"
#import "DetailModel.h"

@interface dataHelper : NSObject
//创建单例
+(instancetype)shareDataHelper;

//get请求: url为网址,dic为{id:"###"},model为具体的model实例,block为解析后传回去的数组
-(void)getDataWithUrl:(NSString *)url dic:(NSDictionary *)dic model:(id)model returnArray:(void(^)(NSMutableArray *arra))valueArray;

//@param  paramDic   附加的post参数
//@param  requestURL   请求的地址
//@param  savedPath   保存在磁盘的位置
//@param  success   下载成功回调
//@param  failure   下载失败回调
//@param  progress   实时下载进度
-(void)downloadFileWithOption:(NSDictionary *)paramDic withURL:(NSString *)requestURL savePath:(NSString *)savedPath downloadSuccess:(void(^)(AFHTTPRequestOperation *operation,id responseObject))success downloadFailure:(void(^)(AFHTTPRequestOperation *operation,NSError *error))failure progress:(void(^)(float progress))progress;


@end
